package com.synergy.stockflow.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
    * 流水号计数器表
    */
@Schema(description="流水号计数器表")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "sys_code_counter")
public class SysCodeCounter {
    /**
     * 主键，编号
     */
    @TableId(value = "counter_id", type = IdType.ASSIGN_ID)
    @Schema(description="主键，编号")
    private Long counterId;

    /**
     * 关联sys_code_rule.rule_id
     */
    @TableField(value = "rule_id")
    @Schema(description="关联sys_code_rule.rule_id")
    private Long ruleId;

    /**
     * 关联sys_code_rule>sys_code_rule_segment.segment_id
     */
    @TableField(value = "segment_id")
    @Schema(description="关联sys_code_rule>sys_code_rule_segment.segment_id")
    private Long segmentId;

    /**
     * 多租户ID
     */
    @TableField(value = "tenant_id")
    @Schema(description="多租户ID")
    private String tenantId;

    /**
     * 周期键，所属周期
     */
    @TableField(value = "cycle_key")
    @Schema(description="周期键，所属周期")
    private String cycleKey;

    /**
     * 流水号值
     */
    @TableField(value = "current_value")
    @Schema(description="流水号值")
    private Integer currentValue;

    /**
     * 最后更新时间
     */
    @TableField(value = "last_updated_time")
    @Schema(description="最后更新时间")
    private Date lastUpdatedTime;
}